﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EntLibEC.View.Menu
{
    public partial class Navigator : PageBase
    {
        private UserControl uc;

        protected void Page_Load(object sender, EventArgs e)
        {
            int seq = 0;

            try
            {
                if (Request.QueryString["seq"] != null)
                {
                    seq = Convert.ToInt32(Request.QueryString["seq"]);
                }

                switch (seq)
                {
                    case 1:
                        uc = (UserControl)Page.LoadControl("SystemFunction.ascx");
                        break;
                    case 2:
                        uc = (UserControl)Page.LoadControl("BasicInformation.ascx");
                        break;
                    case 3:
                        uc = (UserControl)Page.LoadControl("ContentManagement.ascx");
                        break;
                    case 4:
                        uc = (UserControl)Page.LoadControl("WebManagement.ascx");
                        break;
                    case 5:
                        uc = (UserControl)Page.LoadControl("POManagement.ascx");
                        break;
                    case 6:
                        uc = (UserControl)Page.LoadControl("SOManagement.ascx");
                        break;
                    case 7:
                        uc = (UserControl)Page.LoadControl("RMAManagement.ascx");
                        break;
                    case 8:
                        uc = (UserControl)Page.LoadControl("InventoryManagement.ascx");
                        break;
                    case 9:
                        uc = (UserControl)Page.LoadControl("AcctManagement.ascx");
                        break;
                    case 10:
                        uc = (UserControl)Page.LoadControl("ReportAnalysis.ascx");
                        break;
                    default:
                        uc = (UserControl)Page.LoadControl("MyDesktop.ascx");
                        break;
                }
                placeMenu.Controls.Add(uc);
            }
            catch (Exception ex)
            {
                Assert(lblMsg, ex.Message, -1);
            }
        }
    }
}
